# 1. 园丁开局碰到了杰克，被杰ke普攻命中一次。
#  2. 园丁逃跑成功，
#  3. 杰克又找到了医生，医生被杰克普攻命中一次。
#  3. 医生使用技能。
#  4. 医生被杰克命中2次，倒地。

# == = 流程2
# 1.律师开局被杰克普攻命中一次，又被技能命中一次，倒地
# 2.园丁被杰克普攻命中一次，
# 3.园丁逃跑
# 4.园丁找到医生，被医生治疗

from day10.superviser import Superviser, Jack
from day10.survivor import Survivor, Doctor, Garden_girl, Lawyer


class Game():
    def __init__(self,survivor:list,superviser):
        self.survivor=survivor
        self.superviser = superviser

    def process1(self):
        garden_girl=self.survivor[0]
        self.superviser.beat(garden_girl)
        garden_girl.run()

        doctor=self.survivor[1]
        self.superviser.beat(doctor)

        doctor.skill()
        self.superviser.beat(doctor)
        self.superviser.beat(doctor)

    def process2(self):
        lawyer=self.survivor[2]
        self.superviser.beat(lawyer)
        jack.skill(lawyer)

        garden_girl=self.survivor[0]
        self.superviser.beat(garden_girl)
        garden_girl.run()

        doctor=self.survivor[1]
        doctor.cure(garden_girl)

if __name__ == '__main__':
    garden_girl_1=Garden_girl("园丁",2,0)
    doctor_1=Doctor("医生",2,0)
    lawyer_1=Lawyer("律师",2,0)
    jack=Jack("杰克")

    game1=Game([garden_girl_1,doctor_1],jack)
    game1.process1()

    print("--"*10)

    garden_girl_2 = Garden_girl("园丁", 2, 0)
    doctor_2 = Doctor("医生", 2, 0)
    lawyer_2 = Lawyer("律师", 2, 0)
    game2=Game([garden_girl_2, doctor_2,lawyer_2], jack)
    game2.process2()
